#-*- coding:utf-8 -*-
import facebook

graph = None

def api(action, args):
    global facebook
    if action == "use_token":
        graph = facebook.GraphAPI(args['access_token'])
    elif action == "share":
        graph.put_object("me", "feed", message=args['content'])
    else:
        print action, "is not exist."
      

#use_token("AAACDjrAZC2x0BADmiKHPb2CDqtMQ5qjXmcnZBo7RALAPaQJd0m5WnrEH0icZAGKgZBdxGM04E40SLmPBQ478KJ2Y7aU7l0MZD");
#api("share", content="Test");
#profile = graph.get_object("me")
#friends = graph.get_connections("me", "friends")
#graph.put_object("me", "feed", message="I am writing on my wall!")